﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DGZImp.AdsProject.Dtos
{
    /// <summary>
    /// 异常任务Dto
    /// </summary>
    public class AbnormalTaskDto
    {
        //是否修改（区别业务操作）
        public bool isUpdate { get; set; }
        /// <summary>
        /// 异常任务ID
        /// </summary>
        public long TaskId { get; set; }
        /// <summary>
        ///异常任务编号
        /// </summary>
        public string TaskCode { get; set; }
        /// <summary>
        ///异常类型ID
        /// </summary>
        public long AbnormalTypeId { get; set; }
        /// <summary>
        ///设备编码集合
        /// </summary>
        public string EquipmentCodes { get; set; }
        /// <summary>
        ///发起人编码
        /// </summary>
        public string Initiator { get; set; }
        /// <summary>
        ///发起人说明
        /// </summary>
        public string InitiatorRemarks { get; set; }
        /// <summary>
        ///发起人附件
        /// </summary>
        public string InitiatorAttachments { get; set; }
        /// <summary>
        ///任务状态
        /// </summary>
        public int? Status { get; set; }
        /// <summary>
        ///优先级
        /// </summary>
        public int Priority { get; set; }
        /// <summary>
        ///前处理人
        /// </summary>
        public string LastProcessor { get; set; }
        /// <summary>
        ///当前处理人
        /// </summary>
        public string CurrentProcessor { get; set; }
        /// <summary>
        ///处理方法
        /// </summary>
        public string TreatmentMethod { get; set; }
        /// <summary>
        ///处理结果
        /// </summary>
        public string TreatmentResult { get; set; }
        /// <summary>
        ///退回理由
        /// </summary>
        public string Remarks { get; set; }
        /// <summary>
        ///处理附件集合
        /// </summary>
        public string TreatmentAttachments { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; }
        /// <summary>
        /// 是否有效
        /// </summary>
        public int IsValid { get; set; }
        /// <summary>
        /// 是否仅阅读
        /// </summary>
        public bool IsRead { get; set; } = false;
    }

    /// <summary>
    /// 异常任务分页查询Dto
    /// </summary>
    public class AbnormalTaskPageInDto
    {
        /// <summary>
        /// 数据类型 1我创建、2处理过、待处理
        /// </summary>
        public int DataType { get; set; }=1;

        /// <summary>
        /// 异常任务编码
        /// </summary>
        public string abnormalTaskCode { get; set; }
        /// <summary>
        /// 异常类型ID
        /// </summary>
        public long abnormalTypeId { get; set; }
        /// <summary>
        /// 状态
        /// </summary>
        public int? status { get; set; }
        /// <summary>
        /// 优先级
        /// </summary>
        public int? priority { get; set; }
        /// <summary>
        /// 页
        /// </summary>
        public int limit { get; set; } = 1;
        /// <summary>
        /// 条数
        /// </summary>
        public int rows { get; set; } = 10;
    }

    /// <summary>
    /// 异常任务分页查询出参
    /// </summary>
    public class AbnormalTaskPageOutDto {
        /// <summary>
        /// 总页数
        /// </summary>
        public int total { get; set; } = 0;
        /// <summary>
        /// 异常任务列表
        /// </summary>
        public List<AbnormalTaskDto> abnormalTasks { get; set; } = new List<AbnormalTaskDto>();
    }

}
